{
 "cells": [
  {
   "cell_type": "code",
   "id": "initial_id",
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2025-10-27T02:03:37.513706Z",
     "start_time": "2025-10-27T02:03:37.130027Z"
    }
   },
   "source": "import pandas as pd",
   "outputs": [],
   "execution_count": 2
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-10-27T02:03:38.462793Z",
     "start_time": "2025-10-27T02:03:38.441270Z"
    }
   },
   "cell_type": "code",
   "source": [
    "df = pd.read_csv('../data/train.csv')\n",
    "df.info()"
   ],
   "id": "b928a8c3fdfd8ef",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 1100 entries, 0 to 1099\n",
      "Data columns (total 31 columns):\n",
      " #   Column                    Non-Null Count  Dtype \n",
      "---  ------                    --------------  ----- \n",
      " 0   Attrition                 1100 non-null   int64 \n",
      " 1   Age                       1100 non-null   int64 \n",
      " 2   BusinessTravel            1100 non-null   object\n",
      " 3   Department                1100 non-null   object\n",
      " 4   DistanceFromHome          1100 non-null   int64 \n",
      " 5   Education                 1100 non-null   int64 \n",
      " 6   EducationField            1100 non-null   object\n",
      " 7   EmployeeNumber            1100 non-null   int64 \n",
      " 8   EnvironmentSatisfaction   1100 non-null   int64 \n",
      " 9   Gender                    1100 non-null   object\n",
      " 10  JobInvolvement            1100 non-null   int64 \n",
      " 11  JobLevel                  1100 non-null   int64 \n",
      " 12  JobRole                   1100 non-null   object\n",
      " 13  JobSatisfaction           1100 non-null   int64 \n",
      " 14  MaritalStatus             1100 non-null   object\n",
      " 15  MonthlyIncome             1100 non-null   int64 \n",
      " 16  NumCompaniesWorked        1100 non-null   int64 \n",
      " 17  Over18                    1100 non-null   object\n",
      " 18  OverTime                  1100 non-null   object\n",
      " 19  PercentSalaryHike         1100 non-null   int64 \n",
      " 20  PerformanceRating         1100 non-null   int64 \n",
      " 21  RelationshipSatisfaction  1100 non-null   int64 \n",
      " 22  StandardHours             1100 non-null   int64 \n",
      " 23  StockOptionLevel          1100 non-null   int64 \n",
      " 24  TotalWorkingYears         1100 non-null   int64 \n",
      " 25  TrainingTimesLastYear     1100 non-null   int64 \n",
      " 26  WorkLifeBalance           1100 non-null   int64 \n",
      " 27  YearsAtCompany            1100 non-null   int64 \n",
      " 28  YearsInCurrentRole        1100 non-null   int64 \n",
      " 29  YearsSinceLastPromotion   1100 non-null   int64 \n",
      " 30  YearsWithCurrManager      1100 non-null   int64 \n",
      "dtypes: int64(23), object(8)\n",
      "memory usage: 266.5+ KB\n"
     ]
    }
   ],
   "execution_count": 3
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-10-27T02:03:39.743611Z",
     "start_time": "2025-10-27T02:03:39.698693Z"
    }
   },
   "cell_type": "code",
   "source": "df.describe().T",
   "id": "c6df478b0070d23c",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "                           count         mean          std     min      25%  \\\n",
       "Attrition                 1100.0     0.161818     0.368451     0.0     0.00   \n",
       "Age                       1100.0    36.999091     9.037230    18.0    30.00   \n",
       "DistanceFromHome          1100.0     9.427273     8.196694     1.0     2.00   \n",
       "Education                 1100.0     2.922727     1.022242     1.0     2.00   \n",
       "EmployeeNumber            1100.0  1028.157273   598.915204     1.0   504.25   \n",
       "EnvironmentSatisfaction   1100.0     2.725455     1.098053     1.0     2.00   \n",
       "JobInvolvement            1100.0     2.730909     0.706366     1.0     2.00   \n",
       "JobLevel                  1100.0     2.054545     1.107805     1.0     1.00   \n",
       "JobSatisfaction           1100.0     2.732727     1.109731     1.0     2.00   \n",
       "MonthlyIncome             1100.0  6483.620909  4715.293419  1009.0  2924.50   \n",
       "NumCompaniesWorked        1100.0     2.683636     2.510017     0.0     1.00   \n",
       "PercentSalaryHike         1100.0    15.235455     3.628571    11.0    12.00   \n",
       "PerformanceRating         1100.0     3.152727     0.359888     3.0     3.00   \n",
       "RelationshipSatisfaction  1100.0     2.696364     1.095356     1.0     2.00   \n",
       "StandardHours             1100.0    80.000000     0.000000    80.0    80.00   \n",
       "StockOptionLevel          1100.0     0.788182     0.843347     0.0     0.00   \n",
       "TotalWorkingYears         1100.0    11.221818     7.825548     0.0     6.00   \n",
       "TrainingTimesLastYear     1100.0     2.807273     1.291514     0.0     2.00   \n",
       "WorkLifeBalance           1100.0     2.746364     0.701121     1.0     2.00   \n",
       "YearsAtCompany            1100.0     7.011818     6.223093     0.0     3.00   \n",
       "YearsInCurrentRole        1100.0     4.207273     3.618115     0.0     2.00   \n",
       "YearsSinceLastPromotion   1100.0     2.226364     3.313830     0.0     0.00   \n",
       "YearsWithCurrManager      1100.0     4.123636     3.597996     0.0     2.00   \n",
       "\n",
       "                             50%     75%      max  \n",
       "Attrition                    0.0     0.0      1.0  \n",
       "Age                         36.0    43.0     60.0  \n",
       "DistanceFromHome             7.0    15.0     29.0  \n",
       "Education                    3.0     4.0      5.0  \n",
       "EmployeeNumber            1026.5  1556.5   2065.0  \n",
       "EnvironmentSatisfaction      3.0     4.0      4.0  \n",
       "JobInvolvement               3.0     3.0      4.0  \n",
       "JobLevel                     2.0     3.0      5.0  \n",
       "JobSatisfaction              3.0     4.0      4.0  \n",
       "MonthlyIncome             4857.0  8354.5  19999.0  \n",
       "NumCompaniesWorked           2.0     4.0      9.0  \n",
       "PercentSalaryHike           14.0    18.0     25.0  \n",
       "PerformanceRating            3.0     3.0      4.0  \n",
       "RelationshipSatisfaction     3.0     4.0      4.0  \n",
       "StandardHours               80.0    80.0     80.0  \n",
       "StockOptionLevel             1.0     1.0      3.0  \n",
       "TotalWorkingYears           10.0    15.0     40.0  \n",
       "TrainingTimesLastYear        3.0     3.0      6.0  \n",
       "WorkLifeBalance              3.0     3.0      4.0  \n",
       "YearsAtCompany               5.0     9.0     37.0  \n",
       "YearsInCurrentRole           3.0     7.0     18.0  \n",
       "YearsSinceLastPromotion      1.0     3.0     15.0  \n",
       "YearsWithCurrManager         3.0     7.0     17.0  "
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>min</th>\n",
       "      <th>25%</th>\n",
       "      <th>50%</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Attrition</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>0.161818</td>\n",
       "      <td>0.368451</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Age</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>36.999091</td>\n",
       "      <td>9.037230</td>\n",
       "      <td>18.0</td>\n",
       "      <td>30.00</td>\n",
       "      <td>36.0</td>\n",
       "      <td>43.0</td>\n",
       "      <td>60.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>DistanceFromHome</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>9.427273</td>\n",
       "      <td>8.196694</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.00</td>\n",
       "      <td>7.0</td>\n",
       "      <td>15.0</td>\n",
       "      <td>29.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Education</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>2.922727</td>\n",
       "      <td>1.022242</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.00</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>EmployeeNumber</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>1028.157273</td>\n",
       "      <td>598.915204</td>\n",
       "      <td>1.0</td>\n",
       "      <td>504.25</td>\n",
       "      <td>1026.5</td>\n",
       "      <td>1556.5</td>\n",
       "      <td>2065.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>EnvironmentSatisfaction</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>2.725455</td>\n",
       "      <td>1.098053</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.00</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>JobInvolvement</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>2.730909</td>\n",
       "      <td>0.706366</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.00</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>JobLevel</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>2.054545</td>\n",
       "      <td>1.107805</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.00</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>JobSatisfaction</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>2.732727</td>\n",
       "      <td>1.109731</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.00</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>MonthlyIncome</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>6483.620909</td>\n",
       "      <td>4715.293419</td>\n",
       "      <td>1009.0</td>\n",
       "      <td>2924.50</td>\n",
       "      <td>4857.0</td>\n",
       "      <td>8354.5</td>\n",
       "      <td>19999.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>NumCompaniesWorked</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>2.683636</td>\n",
       "      <td>2.510017</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.00</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>PercentSalaryHike</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>15.235455</td>\n",
       "      <td>3.628571</td>\n",
       "      <td>11.0</td>\n",
       "      <td>12.00</td>\n",
       "      <td>14.0</td>\n",
       "      <td>18.0</td>\n",
       "      <td>25.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>PerformanceRating</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>3.152727</td>\n",
       "      <td>0.359888</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.00</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>RelationshipSatisfaction</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>2.696364</td>\n",
       "      <td>1.095356</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.00</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>StandardHours</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>80.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>80.0</td>\n",
       "      <td>80.00</td>\n",
       "      <td>80.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>80.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>StockOptionLevel</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>0.788182</td>\n",
       "      <td>0.843347</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>TotalWorkingYears</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>11.221818</td>\n",
       "      <td>7.825548</td>\n",
       "      <td>0.0</td>\n",
       "      <td>6.00</td>\n",
       "      <td>10.0</td>\n",
       "      <td>15.0</td>\n",
       "      <td>40.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>TrainingTimesLastYear</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>2.807273</td>\n",
       "      <td>1.291514</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2.00</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>WorkLifeBalance</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>2.746364</td>\n",
       "      <td>0.701121</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.00</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>YearsAtCompany</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>7.011818</td>\n",
       "      <td>6.223093</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3.00</td>\n",
       "      <td>5.0</td>\n",
       "      <td>9.0</td>\n",
       "      <td>37.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>YearsInCurrentRole</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>4.207273</td>\n",
       "      <td>3.618115</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2.00</td>\n",
       "      <td>3.0</td>\n",
       "      <td>7.0</td>\n",
       "      <td>18.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>YearsSinceLastPromotion</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>2.226364</td>\n",
       "      <td>3.313830</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>15.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>YearsWithCurrManager</th>\n",
       "      <td>1100.0</td>\n",
       "      <td>4.123636</td>\n",
       "      <td>3.597996</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2.00</td>\n",
       "      <td>3.0</td>\n",
       "      <td>7.0</td>\n",
       "      <td>17.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 4
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": "",
   "id": "b9dbed0c655b4ca0"
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
